package cn.itcast.bos.web.service.base.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.StandardJpaRepository;
import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.web.service.base.StandardService;

@Service
@Transactional
public class StandardServiceImpl implements StandardService {
	@Autowired
	private StandardJpaRepository standardJpaRepository;

	@Override
	public void save(Standard standard) {
		standardJpaRepository.save(standard);

	}

	@Override
	public long findTotal() {
	
		return standardJpaRepository.count();
	}

	@Override
	public Page<Standard> findPageData(Pageable pageAble) {
		
		return standardJpaRepository.findAll(pageAble);
	}



}
